const state = {
    unReadNum:0,
    wsConnect:false
}
const mutations={
    SET_NEWS_COUNT:(state,unReadNum)=>{ //重置未读消息数量
        state.unReadNum=unReadNum
    },
    SET_WS_NEWS_STATUS:(state,wsConnect)=>{ //websocket连接状态
        state.wsConnect=wsConnect
    }    
}
const actions={
    getNewsCount({commit},count){
        commit('SET_NEWS_COUNT',count)
    },
    getWsConnectStatus({commit},wsConnect){
        commit('SET_WS_NEWS_STATUS',wsConnect)
    }    
}
export default {
    state,
    mutations,
    actions
  }